#!/usr/bin/env python
# encoding: utf-8

import sys
import ConfigParser
import os

reload(sys)
sys.setdefaultencoding("utf-8")


def ConfigSectionMap(section):
    dict1 = {}
    Config = ConfigParser.ConfigParser()
    Config.read(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "project.conf"))
    options = Config.options(section)
    for option in options:
        try:
                dict1[option] = Config.get(section, option)
        except:
                dict1[option] = None
    return dict1

